package com.itheima.app.interceptor;


import com.itheima.domain.db.ums.UmsAdmin;

public class AdminHolder {
    private static final ThreadLocal<UmsAdmin> USERTL = new ThreadLocal<>();

    //绑定用户
    public static void set(UmsAdmin umsAdmin){
        USERTL.set(umsAdmin);
    }

    //获取用户
    public static UmsAdmin get(){
        return USERTL.get();
    }

    //解绑用户
    public static void remove(){
        USERTL.remove();
    }
}
